package com.jwdf.uda.ui.activity;

import android.content.Context;
import android.content.Intent;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;

import com.jwdf.uda.R;
import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.databinding.FragmentGuideDetailBinding;
import com.jwdf.uda.event.GuideDetailEvent;
import com.jwdf.uda.event.MessageNoticeEvent;
import com.jwdf.uda.event.ReplyDetailEvent;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.HttpHelper;
import com.jwdf.uda.http.action.UserReadMessageAction;
import com.jwdf.uda.ui.activity.presenter.GuideDetailPresenter;
import com.jwdf.uda.ui.activity.view.IGuideDetailView;
import com.jwdf.uda.ui.adapter.GuideDetailAdapter;
import com.jwdf.uda.ui.adapter.item.GuideDetailItem;
import com.jwdf.uda.ui.fragment.base.BaseFragment;
import com.jwdf.uda.utils.DateUtils;
import com.jwdf.uda.utils.EventBusUtil;
import com.jwdf.uda.view.FilterMenu;
import com.jwdf.uda.view.XListView;
import com.jwdf.uda.view.dialog.ChoiceDialog;
import com.jwdf.uda.view.dialog.ConfirmDialog;
import com.jwdf.uda.view.dialog.FinishConfirmDialog;
import com.jwdf.uda.view.dialog.FinishEvaluationDialog;

import java.util.ArrayList;
import java.util.List;

import retrofit2.Response;

/**
 * 类说明：指导详情
 */
public class GuideDetailActivity extends AbsTitleBarActivity {
    private final static String EXTRA_GUIDE_ID = "id";
    private final static String EXTRA_MSG_ID = "msg_id";
    private final static String EXTRA_TAB_INDEX = "tab_index";//下标0开始

    public static void startActivity(Context context, int id) {
        startActivityForTab(context, id, 0);
    }

    public static void startActivityForTab(Context context, int id, int tabIndex) {
        Intent intent = new Intent(context, GuideDetailActivity.class);
        intent.putExtra(EXTRA_GUIDE_ID, id);
        intent.putExtra(EXTRA_TAB_INDEX, tabIndex);
        context.startActivity(intent);
    }

    public static void startActivity(Context context, int id, int msgId) {
        Intent intent = new Intent(context, GuideDetailActivity.class);
        intent.putExtra(EXTRA_GUIDE_ID, id);
        intent.putExtra(EXTRA_MSG_ID, msgId);
        context.startActivity(intent);
    }

    @Override
    protected String getTopTitle() {
        return getString(R.string.title_guide_detail);
    }

    @Override
    protected void onStart() {
        super.onStart();
        ((GuideDetailFragment) mFragment).registerEvent();
    }

    @Override
    protected void onStop() {
        ((GuideDetailFragment) mFragment).unregisterEvent();
        super.onStop();
    }

    @Override
    protected BaseFragment onCreateContentFragment() {
        return new GuideDetailFragment();
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        int messageId = getIntent().getIntExtra(EXTRA_MSG_ID, 0);
        super.onCreate(savedInstanceState);
        if (messageId != 0) {
            onNewRequestCall(UserReadMessageAction.newInstance(this, messageId).request(new AHttpService.IResCallback<PbBean.PbResUserReadMessage>() {
                @Override
                public void onCallback(int resultCode, Response<PbBean.PbResUserReadMessage> response, PbBean.PbBaseServerInfo baseServerInfo) {
                    if (HttpHelper.showError(GuideDetailActivity.this, resultCode, baseServerInfo, R.string.error_net)) {
                        return;
                    }
                    EventBusUtil.post(new MessageNoticeEvent(MessageNoticeEvent.HAS_READ_MESSAGE));
                }
            }));
        }
    }

    @Override
    protected Bundle onPutArguments() {
        Bundle args = new Bundle();
        args.putInt(EXTRA_GUIDE_ID, getIntent().getIntExtra(EXTRA_GUIDE_ID, 0));
        args.putInt(EXTRA_TAB_INDEX, getIntent().getIntExtra(EXTRA_TAB_INDEX, 0));
        return args;
    }

    @Override
    public void onHeadActionClick(View view) {
        super.onHeadActionClick(view);
        ((GuideDetailFragment) mFragment).onHeadActionClick();
    }

    public static class GuideDetailFragment extends BaseFragment implements IGuideDetailView {
        private final static int CODE_REPLY = 1;
        private final static int CODE_COPY = 2;
        private final static int CODE_DEL = 3;
        private GuideDetailAdapter mAdapter;
        private FragmentGuideDetailBinding mBinding;
        private ChoiceDialog mInteractionDialog;
        private ConfirmDialog mDelInteractionDialog;
        private ChoiceDialog mCommentDialog;
        private ConfirmDialog mDelCommentDialog;
        private FilterMenu mSortMenu;
        private PbBean.PbSignInteractionListSortType mSort = PbBean.PbSignInteractionListSortType.INTERACTION_LIST_SORT_TYPE_TIME_DESC;
        private GuideDetailPresenter mPresenter;

        private ConfirmDialog mFinishReqDialog;
        private FinishConfirmDialog mFinishConfirmDialog;
        private FinishEvaluationDialog mFinishEvaluationDialog;
        private XListView.IXListViewListener mIXListener = new XListView.IXListViewListener() {
            @Override
            public void onRefresh(XListView xListView) {
                mPresenter.requestDetail(PbBean.PbSignInteractionListSortType.INTERACTION_LIST_SORT_TYPE_TIME_DESC);
            }

            @Override
            public void onLoadMore(XListView xListView) {
                if (mAdapter.getCurrentTab() == GuideDetailItem.GuideTab.COMMENT) {
                    mPresenter.getCommentListAction(mAdapter.getCommentOffset());
                } else {
                    mPresenter.setPullLoadEnable(false);
                }
            }
        };

        @Nullable
        @Override
        public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
            mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_guide_detail, container, false);
            initViews();
            return mBinding.getRoot();
        }

        private void initViews() {
            int guideId = getArguments().getInt(EXTRA_GUIDE_ID, 0);
            int tabIndex = getArguments().getInt(EXTRA_TAB_INDEX, 0);
            mAdapter = new GuideDetailAdapter(getActivity());
            mBinding.lvData.setPullRefreshEnable(false);
            mBinding.lvData.hideFooterView();
            mBinding.lvData.setXListViewListener(mIXListener);
            mBinding.lvData.setOnScrollListener(createOnScrollListener());
            mBinding.lvData.setAdapter(mAdapter);
            mPresenter = new GuideDetailPresenter(this, guideId, tabIndex);
            mPresenter.requestDetail(PbBean.PbSignInteractionListSortType.INTERACTION_LIST_SORT_TYPE_TIME_DESC);
            EventBusUtil.registerEvent(this);
        }

        @Override
        public void onDestroyView() {
            EventBusUtil.unregisterEvent(this);
            super.onDestroyView();
        }

        public void registerEvent() {
            EventBusUtil.registerEvent(mPresenter);
            EventBusUtil.registerEvent(mAdapter);
        }

        public void unregisterEvent() {
            EventBusUtil.unregisterEvent(mAdapter);
            EventBusUtil.unregisterEvent(mPresenter);
        }

        @Override
        public int getPageLength() {
            return super.getPageLength();
        }

        @Override
        public int getAdapterCount() {
            return mAdapter.getCount();
        }

        @Override
        public BaseFragment getFragment() {
            return this;
        }

        @Override
        public void onHeadActionClick() {
            mPresenter.onHeadActionClick();
        }

        @Override
        public void setPullLoadEnable(boolean enable) {
            mBinding.lvData.setPullRefreshEnable(true);
            mBinding.lvData.setPullLoadEnable(enable);
            mBinding.lvData.stopRefresh();
            mBinding.lvData.stopLoadMore();
        }

        private AbsListView.OnScrollListener createOnScrollListener() {
            return new XListView.OnXScrollListener() {
                @Override
                public void onXScrolling(View view) {

                }

                @Override
                public void onScrollStateChanged(AbsListView view, int scrollState) {

                }

                @Override
                public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
                    int viewType = view.getAdapter().getItemViewType(view.getFirstVisiblePosition());
                    mBinding.floatingTab.getRoot().setVisibility(GuideDetailItem.TYPE_INTERACTIONT_TITLE <= viewType ? View.VISIBLE : View.GONE);
                }
            };
        }

        @Override
        public void showDetailData(PbBean.PbResGuideDetail detail) {
            mAdapter.setDetailData(detail);
            List<PbBean.PbGuideInteraction> interactions = detail.getInteractionListList();
            if (interactions != null && interactions.size() > 0) {
                setInteractionTitleData(mAdapter.getInteractionTitleItem(detail));
            }
        }

        @Override
        public void showTabSortMenu(View anchor) {
            if (mSortMenu == null) {
                mSortMenu = new FilterMenu(getContext(), R.mipmap.bg_filter_sort);
                List<String> items = new ArrayList<>();
                items.add(getString(R.string.time_asc));
                items.add(getString(R.string.time_desc));
                mSortMenu.bindMenuData(items);
                mSortMenu.setOnMenuItemSelectedListener(createMenuItemListener());
            }
            mSortMenu.show(anchor);
        }

        private FilterMenu.MenuItemAdapter.OnMenuItemSelectedListener createMenuItemListener() {
            return new FilterMenu.MenuItemAdapter.OnMenuItemSelectedListener() {
                @Override
                public void onMenuItemSelected(String item, int position) {
                    mSortMenu.dismissFilterMenu();
                    mSort = 0 == position ? PbBean.PbSignInteractionListSortType.INTERACTION_LIST_SORT_TYPE_TIME_ASC : PbBean.PbSignInteractionListSortType.INTERACTION_LIST_SORT_TYPE_TIME_DESC;
                    mPresenter.requestDetail(mSort);
                }
            };
        }

        public void onEventMainThread(GuideDetailEvent event) {
            if (event != null && GuideDetailEvent.EVENT_DO_SORT == event.getEvent()) {
                mBinding.floatingTab.tvSort.setText(event.getSortType());
            }
        }

        public void onEventMainThread(ReplyDetailEvent event) {
            if (event != null && ReplyDetailEvent.EVENT_COMMENT_ADD == event.getEvent()) {
                mPresenter.requestDetail(mSort);
            }
        }

        @Override
        public void setInteractionTitleData(final GuideDetailItem item) {
            mBinding.floatingTab.tvTitle.setText(getString(R.string.guide_detail_interaction_title, item.interactionCount > 0 ? String.valueOf(item.interactionCount) : ""));
            mBinding.floatingTab.tvSort.setText(item.sortType);
            mBinding.floatingTab.flDropMenu.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    if (item.interactionCount > 0) {
                        GuideDetailEvent event = new GuideDetailEvent(GuideDetailEvent.EVENT_SHOW_DROP_MENU);
                        event.anchor = v;
                        EventBusUtil.post(event);
                    }
                }
            });

            if (item.evaluationTime > 0) {
                mBinding.floatingTab.tvDate.setVisibility(View.VISIBLE);
                String evaluation = "";
                switch (item.evaluation) {
                    case GUIDE_EVALUATION_NONE:
                        evaluation = getString(R.string.guide_detail_evaluation_none);
                        break;
                    case GUIDE_EVALUATION_GOOD:
                        evaluation = getString(R.string.guide_detail_evaluation_good);
                        break;
                    case GUIDE_EVALUATION_NORMAL:
                        evaluation = getString(R.string.guide_detail_evaluation_normal);
                        break;
                    case GUIDE_EVALUATION_BAD:
                        evaluation = getString(R.string.guide_detail_evaluation_bad);
                        break;
                }
                mBinding.floatingTab.tvDate.setText(getString(R.string.guide_detail_interaction_evaluation, DateUtils.getFriendlyTime(item.evaluationTime), evaluation));
            } else {
                mBinding.floatingTab.tvDate.setVisibility(View.GONE);
            }
        }

        @Override
        public void setCurrentTab(GuideDetailItem.GuideTab tab) {
            mAdapter.setCurrentTab(tab);
        }

        @Override
        public GuideDetailItem.GuideTab getCurrentTab() {
            return mAdapter.getCurrentTab();
        }

        @Override
        public void showPraiseView(boolean isLike) {
            mBinding.itemGuide.tvPraise.setSelected(isLike);
        }

        @Override
        public void showPublicView(boolean isPublic) {
//            ((AbsTitleBarActivity) getActivity()).setOperateTitle(getString(R.string.bottom_share));
        }

        @Override
        public void showTaChestView() {
//            ((AbsTitleBarActivity) getActivity()).setOperateTitle(getString(R.string.guide_detail_ta_chest));
        }

        @Override
        public void showBottomGuideView(int commentListCount, int likeListCount) {
            mBinding.itemGuide.getRoot().setVisibility(View.VISIBLE);
            mBinding.itemGuide.tvComment.setText(getString(R.string.reply_bottom_comment, "" + commentListCount));
            mBinding.itemGuide.tvPraise.setText(getString(R.string.reply_bottom_like, "" + likeListCount));
            mBinding.tvBottomStatus.setVisibility(View.GONE);
            mBinding.ivGuideFinish.setVisibility(View.GONE);
            mBinding.itemGuide.flComment.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    mPresenter.toGuideCommentAddActivity();
                }
            });
            mBinding.itemGuide.flPraise.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    mPresenter.doPraiseGuideAction(v);
                }
            });
        }

        @Override
        public void showBottomStatusUserWait() {
            mBinding.itemGuide.getRoot().setVisibility(View.GONE);
            mBinding.tvBottomStatus.setVisibility(View.VISIBLE);
            mBinding.ivGuideFinish.setVisibility(View.GONE);
            mBinding.tvBottomStatus.setText(R.string.guide_detail_user_status_wait);
            mBinding.tvBottomStatus.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    mPresenter.toGuideRespondActivity();
                }
            });
        }

        @Override
        public void showBottomStatusCancel() {
            mBinding.itemGuide.getRoot().setVisibility(View.GONE);
            mBinding.tvBottomStatus.setVisibility(View.VISIBLE);
            mBinding.ivGuideFinish.setVisibility(View.GONE);
            mBinding.tvBottomStatus.setText(R.string.guide_detail_user_status_cancel);
            mBinding.tvBottomStatus.setOnClickListener(null);
            mBinding.tvBottomStatus.setBackgroundResource(R.drawable.selector_guide_bottom_gray_btn);
        }

        @Override
        public void showBottomStatusUserUnderway() {
            mBinding.itemGuide.getRoot().setVisibility(View.GONE);
            mBinding.tvBottomStatus.setVisibility(View.VISIBLE);
            mBinding.ivGuideFinish.setVisibility(View.GONE);
            mBinding.tvBottomStatus.setText(R.string.guide_detail_user_status_server);
            mBinding.tvBottomStatus.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    mPresenter.toGuideInteractionAddActivity();
                }
            });
        }

        @Override
        public void showBottomStatusUserDesignerFinish() {
            mBinding.itemGuide.getRoot().setVisibility(View.GONE);
            mBinding.tvBottomStatus.setVisibility(View.VISIBLE);
            mBinding.ivGuideFinish.setVisibility(View.GONE);
            mBinding.tvBottomStatus.setText(R.string.guide_detail_user_status_finishconfirm);
            mBinding.tvBottomStatus.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    mPresenter.showFinishConfirmDialog();
                }
            });
        }

        @Override
        public void showBottomStatusUserEvaluation() {
            mBinding.itemGuide.getRoot().setVisibility(View.GONE);
            mBinding.tvBottomStatus.setVisibility(View.VISIBLE);
            mBinding.ivGuideFinish.setVisibility(View.GONE);
            mBinding.tvBottomStatus.setText(R.string.guide_detail_user_status_finishevaluation);
            mBinding.tvBottomStatus.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    mPresenter.showFinishEvaluationDialog();
                }
            });
        }

        @Override
        public void showBottomStatusStylistAnswer() {
            mBinding.itemGuide.getRoot().setVisibility(View.GONE);
            mBinding.tvBottomStatus.setVisibility(View.VISIBLE);
            mBinding.ivGuideFinish.setVisibility(View.GONE);
            mBinding.tvBottomStatus.setText(R.string.guide_detail_stylist_status_answer);
            mBinding.tvBottomStatus.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    mPresenter.doStylistAnswerAction();
                }
            });
        }

        @Override
        public void showBottomStatusStylistUnderway() {
            mBinding.itemGuide.getRoot().setVisibility(View.GONE);
            mBinding.tvBottomStatus.setVisibility(View.VISIBLE);
            mBinding.ivGuideFinish.setVisibility(View.VISIBLE);
            mBinding.ivGuideFinish.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    mPresenter.showFinishGuideDialog();
                }
            });
            mBinding.tvBottomStatus.setText(R.string.guide_detail_stylist_status_server);
            mBinding.tvBottomStatus.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    mPresenter.toGuideInteractionAddActivity();
                }
            });
        }

        @Override
        public void showBottomStatusStylistDesignerFinish() {
            mBinding.itemGuide.getRoot().setVisibility(View.GONE);
            mBinding.tvBottomStatus.setVisibility(View.VISIBLE);
            mBinding.ivGuideFinish.setVisibility(View.GONE);
            mBinding.tvBottomStatus.setText(R.string.guide_detail_stylist_status_finishconfirm);
            mBinding.tvBottomStatus.setOnClickListener(null);
            mBinding.tvBottomStatus.setBackgroundResource(R.drawable.selector_guide_bottom_gray_btn);
        }

        @Override
        public void showBottomStatusStylistEvaluation() {
            mBinding.itemGuide.getRoot().setVisibility(View.GONE);
            mBinding.tvBottomStatus.setVisibility(View.VISIBLE);
            mBinding.ivGuideFinish.setVisibility(View.GONE);
            mBinding.tvBottomStatus.setText(R.string.guide_detail_stylist_status_finishevaluation);
        }

        @Override
        public void showFinishGuideDialog() {
            if (mFinishReqDialog == null) {
                mFinishReqDialog = new ConfirmDialog(getActivity(), getString(R.string.dialog_toast_finish_guide_request), getString(R.string.dialog_cancel), getString(R.string.guide_detail_finish_btn));
                mFinishReqDialog.setCallbackListener(new ConfirmDialog.CallbackListener() {
                    @Override
                    public void clickNo() {
                    }

                    @Override
                    public void clickYes() {
                        mPresenter.doDesignerFinishGuideAction();
                    }
                });
            }
            mFinishReqDialog.show();
        }

        @Override
        public void showFinishConfirmDialog() {
            if (mFinishConfirmDialog == null) {
                mFinishConfirmDialog = new FinishConfirmDialog(getActivity());
                mFinishConfirmDialog.setCallbackListener(new FinishConfirmDialog.CallbackListener() {
                    @Override
                    public void clickContinue() {
                        mPresenter.doContinueGuideAction();
                    }

                    @Override
                    public void clickEvaluation() {
                        mPresenter.showFinishEvaluationDialog();
                    }
                });
            }
            mFinishConfirmDialog.show();
        }

        @Override
        public void showFinishEvaluationDialog() {
            if (mFinishEvaluationDialog == null) {
                mFinishEvaluationDialog = new FinishEvaluationDialog(getActivity());
                mFinishEvaluationDialog.setCallbackListener(new FinishEvaluationDialog.CallbackListener() {
                    @Override
                    public void onFinishEvaluation(PbBean.PbSignGuideEvaluation evaluation) {
                        mPresenter.doEvaluationGuideAction(evaluation);
                    }
                });
            }
            mFinishEvaluationDialog.show();
        }

        @Override
        public void showInteractionChoiceDialog(final PbBean.PbGuideInteraction interaction, boolean isAuthor) {
            mInteractionDialog = new ChoiceDialog(getActivity());
            List<ChoiceDialog.ChoiceItem> items = new ArrayList<>();
            items.add(new ChoiceDialog.ChoiceItem(CODE_COPY, getString(R.string.dialog_choice_copy)));
            if (isAuthor) {
                items.add(new ChoiceDialog.ChoiceItem(CODE_DEL, getString(R.string.dialog_choice_del)));
            }
            mInteractionDialog.setChoiceItems(items);
            mInteractionDialog.setCallbackListener(new ChoiceDialog.CallbackListener() {
                @Override
                public void onItemClick(ChoiceDialog.ChoiceItem item) {
                    if (interaction == null) return;
                    switch (item.getCode()) {
                        case CODE_COPY:
                            mPresenter.doCopyContentAction(interaction.getContent());
                            break;
                        case CODE_DEL:
                            mPresenter.showDelInteractionDialog(interaction.getId());
                            break;
                    }
                }
            });
            mInteractionDialog.show();
        }

        @Override
        public void showDelInteractionDialog(final int interactionId) {
            if (mDelInteractionDialog == null) {
                mDelInteractionDialog = new ConfirmDialog(getActivity(), getString(R.string.dialog_toast_del_interaction), getString(R.string.guide_delinteraction_cancel_btn), getString(R.string.guide_delinteraction_sure_btn));
            }
            mDelInteractionDialog.setCallbackListener(new ConfirmDialog.CallbackListener() {
                @Override
                public void clickNo() {
                }

                @Override
                public void clickYes() {
                    mPresenter.doDelInteractionAction(interactionId);
                }
            });
            mDelInteractionDialog.show();
        }

        @Override
        public void showCommentChoiceDialog(final PbBean.PbBaseComment comment, boolean isAuthor) {
            mCommentDialog = new ChoiceDialog(getActivity());
            List<ChoiceDialog.ChoiceItem> items = new ArrayList<>();
            if (isAuthor) {
                items.add(new ChoiceDialog.ChoiceItem(CODE_COPY, getString(R.string.dialog_choice_copy)));
                items.add(new ChoiceDialog.ChoiceItem(CODE_DEL, getString(R.string.dialog_choice_del)));
            } else {
                items.add(new ChoiceDialog.ChoiceItem(CODE_REPLY, getString(R.string.dialog_choice_reply)));
                items.add(new ChoiceDialog.ChoiceItem(CODE_COPY, getString(R.string.dialog_choice_copy)));
            }
            mCommentDialog.setChoiceItems(items);
            mCommentDialog.setCallbackListener(new ChoiceDialog.CallbackListener() {
                @Override
                public void onItemClick(ChoiceDialog.ChoiceItem item) {
                    if (comment == null) return;
                    switch (item.getCode()) {
                        case CODE_REPLY:
                            mPresenter.toGuideCommentAddActivity(comment.getId(), comment.getUserInfo().getNickname());
                            break;
                        case CODE_COPY:
                            mPresenter.doCopyContentAction(comment.getContent());
                            break;
                        case CODE_DEL:
                            mPresenter.showDelCommentDialog(comment.getId());
                            break;
                    }
                }
            });
            mCommentDialog.show();
        }

        @Override
        public void showDelCommentDialog(final int commentId) {
            if (mDelCommentDialog == null) {
                mDelCommentDialog = new ConfirmDialog(getActivity(), getString(R.string.dialog_toast_del_comment), getString(R.string.guide_delcomment_cancel_btn), getString(R.string.guide_delcomment_sure_btn));
            }
            mDelCommentDialog.setCallbackListener(new ConfirmDialog.CallbackListener() {
                @Override
                public void clickNo() {
                }

                @Override
                public void clickYes() {
                    mPresenter.doDelCommentAction(commentId);
                }
            });
            mDelCommentDialog.show();
        }


        @Override
        public void refreshComments(List<PbBean.PbBaseComment> comments, int commentCount) {
            mAdapter.refreshGuideCommentCount(commentCount);
//            mAdapter.addLikeCount(commentCount);
//            mAdapter.refreshComments(comments);
        }

        @Override
        public void loadMoreComments(List<PbBean.PbBaseComment> comments) {
//            mAdapter.loadMoreComments(comments);
        }
    }
}
